﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ComponentsInduction : MonoBehaviour {
    public GameObject[] pages;  //元件介绍页面
    public Button[] buttons;    //元件介绍选择按钮
    public Text contentTxt;     //元件介绍文字
    public string[] contentStr;
	// Use this for initialization
	void Start () {
        //点击按钮，显示相应的元件介绍页面
        for (int i = 0; i < 11; i++) {
            int index = i;
            if (buttons!=null)
            {
                buttons[i].onClick.AddListener(() =>
                {
                    foreach (GameObject page in pages) {
                        page.SetActive(false);
                    }
                    pages[index].SetActive(true);
                });
            }           
        }      
	}
	
    void Init()
    {
       
    }
	// Update is called once per frame
	void Update () {
		
	}


}
